1. Field of the Invention
The present invention relates to a data processor of a microprogram control system, and more particularly, to a data processor which controls operand address calculation and instruction execution by microprograms.
2. Description of the Related Art
In a data processor of a microprogram control system, microprograms are stored in a memory called a micro-ROM beforehand. The data processor then decodes an operation code in an instruction code to generate a start address in the micro-ROM of a corresponding microprogram routine, and sequentially reads out microinstructions from the start address to execute the instruction by controlling the operation of a register or an operation unit.
In formats of the instruction code processed by such a data processor of the microprogram system, there are the format whereby an operand addressing mode is decided by the operation code, and the format in which a field designating the operand addressing mode is independent from the operation code and the addressing mode can be designated for every operand.
In the data processor of the microprogram control system which processes the instruction wherein the addressing mode designation is independent from the operation code, exclusive hardwares for operand address calculation are provided in many cases. In such hardwares, at the time of decoding the instruction, the operation code is decoded to generate a microprogram address, and also an addressing mode designating part is decoded to generate a control code for address calculation. The instruction is executed by the microprogram corresponding to the operation code after calculating the address.
However, in the data processor of the microprogram control system in which the exclusive hardwares for operand address calculation can not be provided due to restriction in sizes of the hardwares, the operand address calculation and instruction execution are processed in the same hardwares. In such a data processor, in some cases, a method of determining the addressing mode by the microprogram to change a microprogram sequence, or to call a subroutine for operand address calculation is adopted. However, in case of adopting this method, since the microprogram for determining the addressing mode is a must, a processing time is prolonged in response thereto.
There is also the case of adopting a method of decoding the operation code and the addressing mode designating part simultaneously at the time of instruction decoding to generate the microprogram address for every addressing mode. In the data processor adopting this method, though the execution time is shortened because the microprogram for determining the addressing mode is not necessary, since it is necessary to prepare the microprogram in response to all addressing modes which can be used for respective operation codes so as to be stored in the micro-ROM, the number of words of the microprogram increases and a capacity of the micro-ROM for storing the words becomes larger.
As described above, in the conventional data processor of the microprogram control system in which the operand address calculation and instruction execution are processed in the same hardwares, the following problems are encountered when executing the instruction having the addressing mode designating part which is independent, from the operation code.
Firstly, in the data processor, in which the addressing mode is determined by the microprogram, and the microprogram execution sequence is changed or the subroutine for address calculation is called in response to the result of the determination of the addressing mode, since the microprogram for determining the addressing mode is necessary, the processing time is prolonged in response thereto.
Secondly, in the data processor, in which the microprogram corresponding also to the addressing mode is executed from the beginning, by simultaneously decoding both the operation code and the addressing mode designating part at the instruction decoding stage to generate the microprogram address, since the microprograms by the number of addressing modes which can be designated for every operation code are necessary, the number of words of the microprograms increases. Thus, a capacity of the micro-ROM must be enlarged to store the words.